/*
 * @Author: anshengtyp
 * @Date: 2023-12-05 11:04:38
 * @LastEditTime: 2023-12-05 11:13:30
 * @LastEditors: anshengtyp
 * @Description:流程管理
 */

import request from '@/utils/request'

// 查询流程列表
export function flowlList(query) {
  return request({
    url: '/wf/name/list',
    method: 'get',
    params: query
  })
}

// 查询流程详细
export function getFlow(id) {
  return request({
    url: '/wf/name/' + id,
    method: 'get'
  })
}

// 新增流程配置
export function addFlow(data) {
  return request({
    url: '/wf/name',
    method: 'post',
    data: data
  })
}

// 修改流程配置
export function updateFlow(data) {
  return request({
    url: '/wf/name',
    method: 'put',
    data: data
  })
}

// 删除流程配置
export function delFlow(id) {
  return request({
    url: '/wf/name/' + id,
    method: 'delete'
  })
}





// 节点接口
export function nodelList(query) {
  return request({
    url: '/wf/activity/list',
    method: 'get',
    params: query
  })
}

// 查询节点详细
export function getNode(id) {
  return request({
    url: '/wf/activity/' + id,
    method: 'get'
  })
}

// 新增节点配置
export function addNode(data) {
  return request({
    url: '/wf/activity',
    method: 'post',
    data: data
  })
}

// 修改节点配置
export function updateNode(data) {
  return request({
    url: '/wf/activity',
    method: 'put',
    data: data
  })
}

// 删除节点配置
export function delNode(id) {
  return request({
    url: '/wf/activity/' + id,
    method: 'delete'
  })
}

